home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 May: Tool Chest / Apple_Developer_Group_CD_Series_May_1995_Tool_Chest.iso / Sample Code / RAMDisk 1.1 / RamCDev.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-13  |  1.8 KB  |  60 lines  |  [TEXT/MPS ]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    StandardFileIcons: A sample control panel changing behavior of StandardFile.
  5. **
  6. **    by Gordon Sheridan and Jim Luther
  7. **  modified by Brian Bechtel
  8. **
  9. **    File:        RamCDev.h
  10. **
  11. **    Copyright © 1992-1994 Apple Computer, Inc.
  12. **    All rights reserved.
  13. **
  14. **    You may incorporate this sample code into your applications without
  15. **    restriction, though the sample code has been provided "AS IS" and the
  16. **    responsibility for its operation is 100% yours.  However, what you are
  17. **    not permitted to do is to redistribute the source as "DTS Sample Code"
  18. **    after having made changes. If you're going to re-distribute the source,
  19. **    we require that you make it clear in the source that the code was
  20. **    descended from Apple Sample Code, but that you've made changes.
  21. **
  22. **    Change History (most recent first):
  23. **
  24. **         <1>     6/13/93    gs        Clean up format.
  25. **/
  26.  
  27. #include "RamDisk.h"
  28.  
  29. enum{    iCheckBox = 1, iEditText, iSizeBar, iPict, iMaxSize, iCurSize };
  30.  
  31. typedef struct
  32. {
  33.     ConfigRecHandle    config;
  34.     DialogPtr        dlgPtr;
  35.     short            dlgItems;
  36.     long            sizepos;
  37.     long            cursize;
  38.     long            maxsize;
  39.     PicHandle        sizePict;
  40.     Str15            curStr;
  41.     Str15            maxStr;
  42. } RDataStorage, *RDataPtr, **RDataHdl;
  43.  
  44.  
  45. RDataHdl    DoInit (DialogPtr CPDialog, short numItems);
  46. RDataHdl    DoNul (RDataHdl hData);
  47. RDataHdl    DoHit (RDataHdl hData, short item);
  48. RDataHdl    DoClose (RDataHdl hData);
  49. RDataHdl    DoUpdate (RDataHdl hData);
  50. RDataHdl    DoActive (RDataHdl hData);
  51. RDataHdl    DoDeactive (RDataHdl hData);
  52. RDataHdl    DoKeyEvent (RDataHdl hData,DialogPtr CPDialog,EventRecord *event);
  53.  
  54. void         DrawItem (RDataHdl hData, short item);
  55.  
  56. Handle        IGetHand (RDataHdl hData, short item);
  57. void        IGetRect (RDataHdl hData, short item, Rect *itemRect);
  58. void        IInvalidate (RDataHdl hData, short item);
  59.  
  60. short        UpdateSysz (ConfigRecHandle config);